<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <title>vue中data使用函数表达</title>
</head>
<body>
    <div id="app">
        <h1>{{name}} </h1>
        <h1>{{age}} </h1>
        <h1>{{hobby}} </h1>
        <img v-bind:src="src1" width="200" alt="">
        <img :src="src2" width="200" alt="">
    </div>
    <script>
        new Vue({
            data(){
                return{
                    name:"zhangsan",
                    age:18,
                    hobby:"打篮球",
                    src1:"https://t7.baidu.com/it/u=4080826490,615918710&fm=193&f=GIF",
                    src2:"https://t7.baidu.com/it/u=3631608752,3069876728&fm=193&f=GIF",
                }
            }
        }).$mount("#app")
    </script>
</body>
</html>